<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	<style>
		/* 相对定位 */
		.rep{
			width: 500px;
			height: 500px;
			background-color: yellow;
			position: absolute;
		}
		.res{
			width: 300px;
			height: 300px;
			background-color: blue;
			position: relative;
			left: 30px;
			top: 30px;
		}
	</style>
		<div class="rep">
			父div
			<div class="res">
				相对定位
			</div>
		</div>
	</body>
</html>
